Optimal. Leaf size=46 \[ -\frac{a^2 \cos (e+f x)}{f}+\frac{2 a b \sec (e+f x)}{f}+\frac{b^2 \sec ^3(e+f x)}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0354167, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {4133, 270} \[ -\frac{a^2 \cos (e+f x)}{f}+\frac{2 a b \sec (e+f x)}{f}+\frac{b^2 \sec ^3(e+f x)}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4133
Rule 270
Rubi steps
\begin{align*} \int \left (a+b \sec ^2(e+f x)\right )^2 \sin (e+f x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{\left (b+a x^2\right )^2}{x^4} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (a^2+\frac{b^2}{x^4}+\frac{2 a b}{x^2}\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{a^2 \cos (e+f x)}{f}+\frac{2 a b \sec (e+f x)}{f}+\frac{b^2 \sec ^3(e+f x)}{3 f}\\ \end{align*}
Mathematica [A] time = 0.114327, size = 75, normalized size = 1.63 \[ \frac{4 \sec ^3(e+f x) \left (a \cos ^2(e+f x)+b\right )^2 \left (-3 a^2 \cos ^4(e+f x)+6 a b \cos ^2(e+f x)+b^2\right )}{3 f (a \cos (2 (e+f x))+a+2 b)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.028, size = 42, normalized size = 0.9 \begin{align*}{\frac{1}{f} \left ({\frac{ \left ( \sec \left ( fx+e \right ) \right ) ^{3}{b}^{2}}{3}}+2\,ab\sec \left ( fx+e \right ) -{\frac{{a}^{2}}{\sec \left ( fx+e \right ) }} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.975928, size = 57, normalized size = 1.24 \begin{align*} -\frac{3 \, a^{2} \cos \left (f x + e\right ) - \frac{6 \, a b}{\cos \left (f x + e\right )} - \frac{b^{2}}{\cos \left (f x + e\right )^{3}}}{3 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.484566, size = 104, normalized size = 2.26 \begin{align*} -\frac{3 \, a^{2} \cos \left (f x + e\right )^{4} - 6 \, a b \cos \left (f x + e\right )^{2} - b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.2744, size = 63, normalized size = 1.37 \begin{align*} -\frac{a^{2} \cos \left (f x + e\right )}{f} + \frac{6 \, a b \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]